package com.fusuhai;

public class Team {
    com.fusuhai.Student[] students;

    public Team() {
        students = new com.fusuhai.Student[3];
    }

    public void addStudent(com.fusuhai.Student student, int i) {
        if (i < students.length) {
            students[i] = student;
        }
    }

    public void listAllStudents() {
        String name = "";
        String no = "";
        for (int i = 0; i < students.length; i++) {
            name = students[i].studentName;
            no = students[i].studentnumber;
            System.out.println("学号为：" + no + "姓名为：" + name);
        }
    }
}
